package com.jie.springwebapp.dao.impl;

import com.jie.springwebapp.dao.EmpDao;
import com.jie.springwebapp.pojo.Emp;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.List;
@Repository
public class EmpDaoA implements EmpDao {
    @Override
    public List<Emp> listEmp() {
        List<Emp> list = new ArrayList<>();
        String[] names = new String[]{"Tom","Make","Jie"};
        Integer[] ages = new Integer[]{10,20,20,30};
        String[] sex = new String[]{"男","女","男"};
        String[] ids = new String[]{"123","456","789"};
        for (int i = 0; i < names.length; i++) {
            list.add(new Emp(names[i],ages[i],sex[i],ids[i]));
        }
        return list;
    }
}